rlimit_vmem_max | Total size of the address space of a process |
rlimit_data_max | Size of the portion of the address space used for data |
rlimit_stack_max | Size of the portion of the address space used for stack |
The limits active during a login session can be displayed and changed using the C-shell command limits. The limits can be queried with getrlimit() and changed with setrlimit() (see the getrlimit(2) reference page).
The initial default value, and the possible range, of a resource limit is established in the kernel tuning parameters. For a quick look at the kernel limits, use
To examine and change the limits, use systune (see the systune(1) reference page):fgrep rlimit /var/sysgen/mtune/kernel
Example 1-1 : Using systune to Check Address Space Limits
systune -i Updates will be made to running system and /unix.install systune-> rlimit_vmem_max rlimit_vmem_max = 536870912 (0x20000000) ll systune-> resource group: resource (statically changeable) ... rlimit_vmem_max = 536870912 (0x20000000) ll rlimit_vmem_cur = 536870912 (0x20000000) ll ... rlimit_stack_max = 536870912 (0x20000000) ll rlimit_stack_cur = 67108864 (0x4000000) ll ...
Tip: These limits interact in the following way: each time your program creates a process with sproc() and does not supply a stack area (see the sproc(2) reference page), an address segment equal to rlimit_stack_max is dedicated to the stack of the new process. When rlimit_stack_max is set high, a program that creates many processes can quickly run into the rlimit_vmem_max boundary.